package com.xiashitech.agent.instrumentation.redis.lettuce;

import com.xiashitech.agent.instrumentation.redis.RedisData;
import io.opentelemetry.javaagent.shaded.instrumentation.api.instrumenter.Instrumenter;

/**
 * lettuce Instrumenter 工厂
 */
public class XsLettuceSingletons {

    private XsLettuceSingletons() {

    }

    private static final String INSTRUMENTATION_NAME = "com.xiashitech.lettuce";

    private static final Instrumenter<RedisData, Object> INST;

    private static final Instrumenter<RedisData, Object> ASYNC_INST;

    public static Instrumenter<RedisData, Object> instrumenter() {
        return INST;
    }

    public static Instrumenter<RedisData, Object> asyncInstrumenter() {
        return ASYNC_INST;
    }

    static {
        INST = new XSLettuceProcessor("xs.lettuce").buildInstrumenter(INSTRUMENTATION_NAME);
        ASYNC_INST = new XSLettuceProcessor("xs.lettuce.async").buildInstrumenter(INSTRUMENTATION_NAME);
    }

}
